<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@include file="link.jsp" %>

<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <h5>${requestScope.Shouser.uname}详细信息</h5>
    <img src="/img/${requestScope.Shouser.uphoto}" width="100px" height="60px">
    等级：${requestScope.Shouser.lv}
    性别：${requestScope.Shouser.usex}
    粉丝：${requestScope.Shouser.fen.size()}
    创建时间：${requestScope.Shouser.uchangeTime}
</div>

文章详细
<div>
    <c:forEach var="title" items="${requestScope.userPage.list}">
        <div>
            <h2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <%--超链接点击展示文章信息和留言信息--%>
                <a href="/title/showMessage?tid=${title.tid}">${title.tname}</a>
            </h2>
            <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;
                时间${title.tcreateTime}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

            <%--如果是登录用户的文章就不显示关注了--%>
            <c:if test="${sessionScope.loginUser.uid==title.user.uid}">

            </c:if>
            <%--如果不是登录用户的文昭那个就--%>
            <c:if test="${sessionScope.loginUser.uid!=title.user.uid}">
                <a href="${pageContext.request.contextPath}/title/guanzhu?tid=${title.tid}&&pageNum=${sessionScope.titlePage.pageNum}">关注</a>：${title.tguanZhu}
            </c:if>
             &nbsp;&nbsp;
            <%--如果是当前用户则可以删除--%>
            <c:if test="${not empty sessionScope.loginUser}">
                <c:if test="${title.user.uname == sessionScope.loginUser.uname}">
                    <a href="#">删除</a>&nbsp;&nbsp;
                    <a href="#">编辑</a>
                </c:if>
            </c:if>
        </span>
                <%--截取字符串--%>
            <p>&nbsp;&nbsp;${fn:substring(title.tcontent,0 ,20)}.</p>
        </div>
    </c:forEach>
</div>
<%--下面的连接前一页 后一页--%>
<c:if test="${userPage.pageNum <=1}">

</c:if>
<c:if test="${userPage.pageNum >1}">
    <a href="${pageContext.request.contextPath}/user/show?pageNum=${userPage.pageNum-1}&uid=${requestScope.Shouser.uid}">前一页</a>
</c:if>

<c:forEach begin="${userPage.start}" var="i" end="${userPage.end}" step="1">
    <c:if test="${userPage.pageNum==i}">
        &nbsp;&nbsp; <a href="${pageContext.request.contextPath}/user/show?pageNum=${i}&uid=${Shouser.uid}"
                        style="color: red">${i}</a>&nbsp;&nbsp;
    </c:if>
    <c:if test="${userPage.pageNum!=i}">
        &nbsp;&nbsp;<a href="${pageContext.request.contextPath}/user/show?pageNum=${i}&uid=${Shouser.uid}">${i}</a>&nbsp;&nbsp
    </c:if>

</c:forEach>

<c:if test="${userPage.pageNum >= userPage.totalRecord}">

</c:if>
<c:if test="${userPage.pageNum < userPage.totalRecord}">
    <a href="${pageContext.request.contextPath}/user/show?pageNum=${userPage.pageNum+1}&uid=${Shouser.uid}">后一页</a>
</c:if>
</body>
</html>